<?php
header('Content-Type: text/xml');
print "<?xml version='1.0' encoding='ISO-8859-1'?>";
print "<response><update>";
if ($error == true) print "failed";
else print "completed";
print "</update><msg>" . htmlspecialchars($msg) . "</msg><total>";
print $total;
print "</total><news-list>";
if ($news_list != null) {
	for ($cntr = 0; $cntr < count($news_list); $cntr++) {
		$news = $news_list[$cntr];
		print "<news><id>";
		print $news->news_id;
		print "</id><ts>";
		print $news->news_ts;
		print "</ts><body>";
		print "<![CDATA[" . $news->news . "]]>";
		print "</body><url>";
		print "<![CDATA[" . $news->news_url . "]]>";
		print "</url><type>";
		print $news->news_type;
		print "</type></news>";
	}
}
print "</news-list></response>";
?>
